<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>1.关于构造函数</title>
    </head>
    <body>
        <script type="text/javascript" >

            function Dog (name,age) {
                this.name = name
                this.age = age
            }

            function Person (name,age) {
                this.name = name
                this.age = age
            }

            let d1 = new Dog('旺财',3)
            let p1 = new Person('张天禹',3)

            console.log(d1)
            console.log(p1)
        </script>
    </body>
</html>